<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %> 
<%
   String path = request.getContextPath();
   String webpath = path +  "/qiantai";
%>
<!DOCTYPE html>
<HTML xmlns="http://www.w3.org/1999/xhtml">
  <head>
   <title>云梦公益在线读书系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="<%=webpath %>/css/all.css">
 

    <STYLE type=text/css>
    </STYLE>
    
    <script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
    <script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
    <script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
    
    <script type="text/javascript" src="<%=path %>/js/popup.js"></script>
    
    <script type="text/javascript">
         function admin()
         {
            var url="<%=path %>/login.jsp";
            window.open(url,"_blank");
         }
         
         function auser()
         {
            var url="<%=path %>/auser/index.jsp";
            window.open(url,"_blank");
         }
         
         
         function chaxun()
         {
            document.zhutiSea.submit();
         }
         
         function zhutiAdd(catelogId)
	     {
	           <c:if test="${sessionScope.user==null}">
		           alert("请先登录");
		       </c:if> 
		       <c:if test="${sessionScope.user!=null}">
		           var url="<%=path %>/qiantai/zhuti/zhutiAdd.jsp";
		           window.location.href=url;
	           </c:if> 
	     }
	     
	     function check()
		 {                                                                                         
		     if(document.ThisForm.userName.value=="")
			 {
			 	alert("请输入用户名");
				return false;
			 }
			 if(document.ThisForm.userPw.value=="")
			 {
			 	alert("请输入密码");
				return false;
			 }
			 document.getElementById("indicator").style.display="block";
			 loginService.login(document.ThisForm.userName.value,document.ThisForm.userPw.value,document.ThisForm.vcode.value,1,callback);
		 }
		
		 function callback(data)
		 {
		    document.getElementById("indicator").style.display="none";
		    if(data=="no")
		    {
		        alert("用户名或密码错误");
		    }
		    
		      if(data=="codeerror")
	    {
	        alert("验证码错误");
	        return;
	    }
	    
		    if(data=="yes")
		    {   
		        alert("登陆成功");
		        var url="<%=path %>/qiantai/default.jsp";
		        window.location.href=url;
		    }
		 }
		 
		 
		 function up()
	     {
	        var pop=new Popup({ contentType:1,isReloadOnClose:false,width:400,height:200});
            pop.setContent("contentUrl","<%=path %>/upload/upload.jsp");
            pop.setContent("title","文件上传");
            pop.build();
            pop.show();
	     }
	     
	     function zhuce()
	     {
	        if(document.form1.loginname.value=="")
	        {
	            alert("请输入账号");
	            return false;
	        }
	        if(document.form1.loginpw.value=="")
	        {
	            alert("请输入密码");
	            return false;
	        }
	        document.form1.submit();
	     }
	     
	     
	     
	     		 function fresh(v,url) {
					v.src = url +"/CheckCode.tmp?id=" + Math.floor(Math.random() * 1000);
					 
				}
    </script>
    
  </head>
  
 <body class=""><div class="" style="display: none; position: absolute;"><div class="aui_outer"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td colspan="2" class="aui_header"><div class="aui_titleBar"><div class="aui_title" style="cursor: move;"></div></div></td></tr><tr><td class="aui_icon" style="display: none;"><div class="aui_iconBg" style="background: none;"></div></td><td class="aui_main" style="width: auto; height: auto;"><div class="aui_content" style="padding: 20px 25px;"></div></td></tr><tr><td colspan="2" class="aui_footer"><div class="aui_buttons" style="display: none;"></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se" style="cursor: se-resize;"></td></tr></tbody></table></div></div>
<input type="hidden" id="J_IsPc" value="1">
   
<div class="header">
<div class="pager clearfix">
<div class="logo">
 
</div>
<div class="login">
<a href="<%=webpath%>/userinfo/userReg.jsp" class="J_Login">注册</a>
<q></q>

</div>
</div>
</div>
              		<input type="hidden" name="dispatcher" id="dispatcher-admin" value="regPhone">
		<div class="bodier regphone">
			<div class="pager">
				<div class="content">
					<h1 class="titler clearfix"><q class="t-reg"></q>用户登录</h1>
					<div class="note1">
						<p>您正在登录云梦公益在线读书系统帐号。</p>
				 
				 
					</div>
					 <form action="" name="ThisForm" method="post">
						<input type="hidden" name="sourceid" value="">
						<input type="hidden" name="relayState" value="">
						<div class="form-item form-pos">
							<label for="J_Phone">账号</label>
							<input type="text" class="txt" id="J_Phone" name="userName"    maxlength="11" datatype="phone2">
					 
						</div>
						
						
					   <div class="form-item form-pos">
							<label for="J_Phone">密码</label>
							<input type="password" name="userPw"  class="txt"      maxlength="11" datatype="phone2">
					 
						</div>
						
						
						  <div class="form-item form-pos">
							<label for="J_Phone">验证码</label>
							
						 
							<input name="vcode" id="vcode"  class="txt"  style="width: 80px;"    maxlength="11" datatype="phone2">
					 <img src="<%=path%>/CheckCode.tmp" style="width: 93px; height: 26px;vertical-align: bottom;" border="0" id="authcode_img" name="Img1" onclick="fresh(document.getElementById(&#39;authcode_img&#39;),'<%=path%>');">
							 
						</div>
						
						
						
						
						 
						 
						<div class="form-item">
						 <img id="indicator" src="<%=path %>/img/loading.gif" style="display:none"/>
							<input type="button" value="提交" onclick="check();" class="submit">
						</div>
					</form>
					 
				</div>
			 
			</div>
		</div>
<div class="footer">
<div class="pager">
 
<p class="copyright">蜀ICP备15012512号-1 © 2017 网文化科技有限公司</p>
</div>
</div>
 

</body>
</html>
